Optimal. Leaf size=345 \[ \frac {\left (2 a^2 A+3 a b B-5 A b^2\right ) F\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{3 a^2 d \left (a^2-b^2\right )}+\frac {b (A b-a B) \sin (c+d x)}{a d \left (a^2-b^2\right ) \cos ^{\frac {3}{2}}(c+d x) (a+b \cos (c+d x))}+\frac {\left (2 a^2 A+3 a b B-5 A b^2\right ) \sin (c+d x)}{3 a^2 d \left (a^2-b^2\right ) \cos ^{\frac {3}{2}}(c+d x)}+\frac {\left (-2 a^3 B+4 a^2 A b+3 a b^2 B-5 A b^3\right ) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{a^3 d \left (a^2-b^2\right )}+\frac {b \left (-5 a^3 B+7 a^2 A b+3 a b^2 B-5 A b^3\right ) \Pi \left (\frac {2 b}{a+b};\left .\frac {1}{2} (c+d x)\right |2\right )}{a^3 d (a-b) (a+b)^2}-\frac {\left (-2 a^3 B+4 a^2 A b+3 a b^2 B-5 A b^3\right ) \sin (c+d x)}{a^3 d \left (a^2-b^2\right ) \sqrt {\cos (c+d x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 1.29, antiderivative size = 345, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 7, integrand size = 33, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.212, Rules used = {3000, 3055, 3059, 2639, 3002, 2641, 2805} \[ \frac {\left (2 a^2 A+3 a b B-5 A b^2\right ) F\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{3 a^2 d \left (a^2-b^2\right )}+\frac {\left (4 a^2 A b-2 a^3 B+3 a b^2 B-5 A b^3\right ) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{a^3 d \left (a^2-b^2\right )}+\frac {b \left (7 a^2 A b-5 a^3 B+3 a b^2 B-5 A b^3\right ) \Pi \left (\frac {2 b}{a+b};\left .\frac {1}{2} (c+d x)\right |2\right )}{a^3 d (a-b) (a+b)^2}+\frac {b (A b-a B) \sin (c+d x)}{a d \left (a^2-b^2\right ) \cos ^{\frac {3}{2}}(c+d x) (a+b \cos (c+d x))}+\frac {\left (2 a^2 A+3 a b B-5 A b^2\right ) \sin (c+d x)}{3 a^2 d \left (a^2-b^2\right ) \cos ^{\frac {3}{2}}(c+d x)}-\frac {\left (4 a^2 A b-2 a^3 B+3 a b^2 B-5 A b^3\right ) \sin (c+d x)}{a^3 d \left (a^2-b^2\right ) \sqrt {\cos (c+d x)}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2639
Rule 2641
Rule 2805
Rule 3000
Rule 3002
Rule 3055
Rule 3059
Rubi steps
\begin {align*} \int \frac {A+B \cos (c+d x)}{\cos ^{\frac {5}{2}}(c+d x) (a+b \cos (c+d x))^2} \, dx &=\frac {b (A b-a B) \sin (c+d x)}{a \left (a^2-b^2\right ) d \cos ^{\frac {3}{2}}(c+d x) (a+b \cos (c+d x))}+\frac {\int \frac {\frac {1}{2} \left (2 a^2 A-5 A b^2+3 a b B\right )-a (A b-a B) \cos (c+d x)+\frac {3}{2} b (A b-a B) \cos ^2(c+d x)}{\cos ^{\frac {5}{2}}(c+d x) (a+b \cos (c+d x))} \, dx}{a \left (a^2-b^2\right )}\\ &=\frac {\left (2 a^2 A-5 A b^2+3 a b B\right ) \sin (c+d x)}{3 a^2 \left (a^2-b^2\right ) d \cos ^{\frac {3}{2}}(c+d x)}+\frac {b (A b-a B) \sin (c+d x)}{a \left (a^2-b^2\right ) d \cos ^{\frac {3}{2}}(c+d x) (a+b \cos (c+d x))}+\frac {2 \int \frac {-\frac {3}{4} \left (4 a^2 A b-5 A b^3-2 a^3 B+3 a b^2 B\right )+\frac {1}{2} a \left (a^2 A+2 A b^2-3 a b B\right ) \cos (c+d x)+\frac {1}{4} b \left (2 a^2 A-5 A b^2+3 a b B\right ) \cos ^2(c+d x)}{\cos ^{\frac {3}{2}}(c+d x) (a+b \cos (c+d x))} \, dx}{3 a^2 \left (a^2-b^2\right )}\\ &=\frac {\left (2 a^2 A-5 A b^2+3 a b B\right ) \sin (c+d x)}{3 a^2 \left (a^2-b^2\right ) d \cos ^{\frac {3}{2}}(c+d x)}-\frac {\left (4 a^2 A b-5 A b^3-2 a^3 B+3 a b^2 B\right ) \sin (c+d x)}{a^3 \left (a^2-b^2\right ) d \sqrt {\cos (c+d x)}}+\frac {b (A b-a B) \sin (c+d x)}{a \left (a^2-b^2\right ) d \cos ^{\frac {3}{2}}(c+d x) (a+b \cos (c+d x))}+\frac {4 \int \frac {\frac {1}{8} \left (2 a^4 A+16 a^2 A b^2-15 A b^4-12 a^3 b B+9 a b^3 B\right )+\frac {1}{4} a \left (7 a^2 A b-10 A b^3-3 a^3 B+6 a b^2 B\right ) \cos (c+d x)+\frac {3}{8} b \left (4 a^2 A b-5 A b^3-2 a^3 B+3 a b^2 B\right ) \cos ^2(c+d x)}{\sqrt {\cos (c+d x)} (a+b \cos (c+d x))} \, dx}{3 a^3 \left (a^2-b^2\right )}\\ &=\frac {\left (2 a^2 A-5 A b^2+3 a b B\right ) \sin (c+d x)}{3 a^2 \left (a^2-b^2\right ) d \cos ^{\frac {3}{2}}(c+d x)}-\frac {\left (4 a^2 A b-5 A b^3-2 a^3 B+3 a b^2 B\right ) \sin (c+d x)}{a^3 \left (a^2-b^2\right ) d \sqrt {\cos (c+d x)}}+\frac {b (A b-a B) \sin (c+d x)}{a \left (a^2-b^2\right ) d \cos ^{\frac {3}{2}}(c+d x) (a+b \cos (c+d x))}-\frac {4 \int \frac {-\frac {1}{8} b \left (2 a^4 A+16 a^2 A b^2-15 A b^4-12 a^3 b B+9 a b^3 B\right )-\frac {1}{8} a b^2 \left (2 a^2 A-5 A b^2+3 a b B\right ) \cos (c+d x)}{\sqrt {\cos (c+d x)} (a+b \cos (c+d x))} \, dx}{3 a^3 b \left (a^2-b^2\right )}+\frac {\left (4 a^2 A b-5 A b^3-2 a^3 B+3 a b^2 B\right ) \int \sqrt {\cos (c+d x)} \, dx}{2 a^3 \left (a^2-b^2\right )}\\ &=\frac {\left (4 a^2 A b-5 A b^3-2 a^3 B+3 a b^2 B\right ) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{a^3 \left (a^2-b^2\right ) d}+\frac {\left (2 a^2 A-5 A b^2+3 a b B\right ) \sin (c+d x)}{3 a^2 \left (a^2-b^2\right ) d \cos ^{\frac {3}{2}}(c+d x)}-\frac {\left (4 a^2 A b-5 A b^3-2 a^3 B+3 a b^2 B\right ) \sin (c+d x)}{a^3 \left (a^2-b^2\right ) d \sqrt {\cos (c+d x)}}+\frac {b (A b-a B) \sin (c+d x)}{a \left (a^2-b^2\right ) d \cos ^{\frac {3}{2}}(c+d x) (a+b \cos (c+d x))}+\frac {\left (2 a^2 A-5 A b^2+3 a b B\right ) \int \frac {1}{\sqrt {\cos (c+d x)}} \, dx}{6 a^2 \left (a^2-b^2\right )}+\frac {\left (b \left (7 a^2 A b-5 A b^3-5 a^3 B+3 a b^2 B\right )\right ) \int \frac {1}{\sqrt {\cos (c+d x)} (a+b \cos (c+d x))} \, dx}{2 a^3 \left (a^2-b^2\right )}\\ &=\frac {\left (4 a^2 A b-5 A b^3-2 a^3 B+3 a b^2 B\right ) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{a^3 \left (a^2-b^2\right ) d}+\frac {\left (2 a^2 A-5 A b^2+3 a b B\right ) F\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{3 a^2 \left (a^2-b^2\right ) d}+\frac {b \left (7 a^2 A b-5 A b^3-5 a^3 B+3 a b^2 B\right ) \Pi \left (\frac {2 b}{a+b};\left .\frac {1}{2} (c+d x)\right |2\right )}{a^3 (a-b) (a+b)^2 d}+\frac {\left (2 a^2 A-5 A b^2+3 a b B\right ) \sin (c+d x)}{3 a^2 \left (a^2-b^2\right ) d \cos ^{\frac {3}{2}}(c+d x)}-\frac {\left (4 a^2 A b-5 A b^3-2 a^3 B+3 a b^2 B\right ) \sin (c+d x)}{a^3 \left (a^2-b^2\right ) d \sqrt {\cos (c+d x)}}+\frac {b (A b-a B) \sin (c+d x)}{a \left (a^2-b^2\right ) d \cos ^{\frac {3}{2}}(c+d x) (a+b \cos (c+d x))}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 6.92, size = 427, normalized size = 1.24 \[ \frac {\sqrt {\cos (c+d x)} \left (\frac {2 \sec (c+d x) (a B \sin (c+d x)-2 A b \sin (c+d x))}{a^3}+\frac {2 A \tan (c+d x) \sec (c+d x)}{3 a^2}+\frac {A b^4 \sin (c+d x)-a b^3 B \sin (c+d x)}{a^3 \left (a^2-b^2\right ) (a+b \cos (c+d x))}\right )}{d}+\frac {\frac {2 \left (-6 a^3 b B+12 a^2 A b^2+9 a b^3 B-15 A b^4\right ) \sin (c+d x) \cos (2 (c+d x)) \left (\left (b^2-2 a^2\right ) \Pi \left (-\frac {b}{a};\left .\sin ^{-1}\left (\sqrt {\cos (c+d x)}\right )\right |-1\right )+2 a (a+b) F\left (\left .\sin ^{-1}\left (\sqrt {\cos (c+d x)}\right )\right |-1\right )-2 a b E\left (\left .\sin ^{-1}\left (\sqrt {\cos (c+d x)}\right )\right |-1\right )\right )}{a b^2 \sqrt {1-\cos ^2(c+d x)} \left (2 \cos ^2(c+d x)-1\right )}+\frac {\left (-12 a^4 B+28 a^3 A b+24 a^2 b^2 B-40 a A b^3\right ) \left (2 F\left (\left .\frac {1}{2} (c+d x)\right |2\right )-\frac {2 a \Pi \left (\frac {2 b}{a+b};\left .\frac {1}{2} (c+d x)\right |2\right )}{a+b}\right )}{b}+\frac {2 \left (4 a^4 A-30 a^3 b B+44 a^2 A b^2+27 a b^3 B-45 A b^4\right ) \Pi \left (\frac {2 b}{a+b};\left .\frac {1}{2} (c+d x)\right |2\right )}{a+b}}{12 a^3 d (a-b) (a+b)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {B \cos \left (d x + c\right ) + A}{{\left (b \cos \left (d x + c\right ) + a\right )}^{2} \cos \left (d x + c\right )^{\frac {5}{2}}}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 6.82, size = 1031, normalized size = 2.99 \[ \text {result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.00 \[ \int \frac {A+B\,\cos \left (c+d\,x\right )}{{\cos \left (c+d\,x\right )}^{5/2}\,{\left (a+b\,\cos \left (c+d\,x\right )\right )}^2} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________